#include <string>
#include <map>

using namespace std;

bool canConstruct(string ransomNote, string magazine)
{
    map<char,int> m;
    for(char & c : magazine)
    {
        m.count(c) == 0 ? m[c] = 1 : ++ m[c];
    }

    for(auto &c : ransomNote)
    {
        int count = m.count(c); 
        if(count == 0) return false;
        -- m[c];
    }
    return true;
}

int main(int argc, char const *argv[])
{
    
    return 0;
}
